/*
 * XPlatformInterface.java
 * 
 * Copyright (c) 2006 - 2007
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.xfc.util.platform;

import java.io.File;
import java.io.IOException;
import java.net.URL;

/**
 * An interface to platform specific functionality.
 * 
 * @author Devon Carew
 */
public interface XPlatformInterface
{
	
	/**
	 * Implementors of the XPlatformInterface need to provide a constructor taking an XApp object as a parameter. 
	 * 
	 * @param app
	 */
	//public XPlatformInterface(XApp app);
	
	
	// TODO: FileDialog methods here
	
	
	
	// TODO: Print and Page setup dialogs here
	
	
	
	
	// Browser support
	
	/**
	 * Display the given file in the platform default browser.
	 * 
	 * @param file
	 * @throws IOException
	 */
	public void showInBrowser(File file)
		throws IOException;
	
	/**
	 * Display the given URL in the platform default browser.
	 * 
	 * @param url the URL to display
	 * @throws IOException
	 */
	public void showInBrowser(String url)
		throws IOException;
	
	/**
	 * Display the given URL in the platform default browser.
	 * 
	 * @param url
	 * @throws IOException
	 */
	public void showInBrowser(URL url)
		throws IOException;
	
	
}
